using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter26
{
	/// <summary>
	/// Example06: A Paper-Filled Capacitor
	/// A parallel-plate capacitor has plates of dimensions 2.0 cm 
	/// by 3.0 cm separated by a 1.0-mm thickness of paper. 
	/// (A)	
	/// Find its capacitance.
	/// (B)	
	/// What is the maximum charge that can be placed on the 
	/// capacitor?
	/// </summary>
	public class Example06
	{
		public Example06()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Area A = new L.Area();
			A.mSQUARE = 2.0E-2*3.0E-2;
			L.Length d = new L.Length();
			d.m = 1.0E-3;
			//(A)
			L.Capacitance C = new L.Capacitance(A,d);
			C.DielectricConstant = 3.7;
			result += Convert.ToString(C.F);
			//(B) 
			L.ElectricPotentialDifference V = new L.ElectricPotentialDifference();
			V.V = 16.0E3;
			L.ElectricCharge q = new L.ElectricCharge(C,V);
			result += "    " + Convert.ToString(q.C);
		}
	}
}
